#include <cstdlib>
#include "server.h"
extern "C"
{
	#include "stdio.h"
	#include "stdlib.h"

}
int main(int argc,char *argv[]){
	Server *server = NULL;
	printf("欢迎来到DMS数据采集系统服务端\n");
	if(argc == 1){
		//printf("no arg init!\n");
		server = new Server();
	}else{
		//printf("have arg init\n");
		short port = atoi(argv[1]);
		server = new Server(argv[2], port);
	}
	//启动服务器端开始数据采集
	server->dataMine();
	
	delete server;
	server = NULL;
	return 0;
}	
